using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.IO;

namespace SgsUI
{
    [RequireComponent(typeof(RectTransform))]

    public class ViewOther : ViewNode
    {
        [SerializeField] private string text;

        [SerializeField] private int fontsize;

        LabelRes m_label;

        protected ViewOther()
        {
            // type = "label";
        }

        public override void UpdateParam()
        {
            base.UpdateParam();
        }

        protected override string GetDefaultName()
        {
            return "label";
        }

        public override bool HasAtriSize()
        {
            return false;
        }

        protected override void WriteOtherParam(NodeData nodeData)
        {
            if(text != String.Empty)
            {
                ParamData param_text = new ParamData();
                param_text.SetValue("text",LuaHelper.Instance.GetTransTextKey(text));//text);
                nodeData.AddParam(param_text);
            }

            ParamData param_size = new ParamData();
            param_size.SetValue("size",fontsize);
            nodeData.AddParam(param_size);

            // ParamData param_color = new ParamData();
            // param_color.SetValue("color",color);
            // nodeData.AddParam(param_color);
        }
    }
}